home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / FTP2UK23.ZIP / ftget10.doc < prev    next >
Internet Message Format  |  1991-09-16  |  4KB

  1. From nino@mph.sm.ucl.ac.uk Mon Sep 16 19:12:21 1991
  2. From: nino@mph.sm.ucl.ac.uk (Nino Margetic)
  3. Date: Mon, 16 Sep 1991 19:14:13 +0100
  4. Organization: University College London - Dept. of Medical Physics
  5. Subject: ftget version 1.0
  6.  
  7. Hi,
  8.  
  9. Maybe you'll find the following experience usefull - it is not general,
  10. and it is applicable only for Unix hosts on the Janet network, but I'm
  11. sure that there must be a dedicated VMS (or whateverOS) hacker who can
  12. think of something similar for the appropriate OS.
  13.  
  14. When I want something from Simtel (or, for that matter, any other PD sw
  15. repository in USA) I go thru the ft-relay. It's much faster than any
  16. other option.
  17.  
  18. I have written two little shell scripts which I have put into my ~/bin
  19. directory (but it can be anywhere within your search path) and I have
  20. called them ftget and ftget.proto (but it will work quite well under any
  21. other name - providing a line or two were changed).
  22.  
  23. The ftget.proto is just an interface to the ftget script which actually
  24. invokes the NIFTP/FTP transfer (it can be hhcp, or cpf, or fcp, or
  25. whatever) via the uk.ac.ft-relay gateway.
  26.  
  27. The general way of invoking the transfer is:
  28.  
  29.     short_hostname [-b] remote_directory remote_file
  30.  
  31. For each system I wish to connect, I add a symbolic link with an unique
  32. hostname which points to the ftget.proto script, and add an extra line
  33. into the ftget.proto script which will describe the new system.  Symbolic
  34. link can be created by:
  35.  
  36.     ln -s ftget.proto short_hostname
  37.  
  38. The extra line in the ftget.proto script (below the case statement) is of
  39. the form:
  40.  
  41.     short_hostname) host=some.host.university.edu;bdir=base_directory;;
  42.  
  43. You can set bdir to /pub or whatever, to shorten the typing for every
  44. transfer.
  45.  
  46. As an example, if I want to collect a file from the Wuarchive.Wustl.Edu
  47. (mirror of Simtel20, but more FTP lines, and faster thruput), let's say
  48. the file: BAT2EX14.ZIP from the PCMAG directory, I issue the command:
  49.  
  50.     wustl -b pcmag bat2ex14.zip
  51.  
  52. where the script "wustl" is only a symbolic link (created by:
  53.  
  54.      ln -s ftget.proto wustl
  55.  
  56. Unix command) to the original ftget.proto script. The -b switch stands
  57. for binary transfers. The accompanying line in the ftget.proto reads:
  58.  
  59.     wustl)    host=wuarchive.wustl.edu;bdir=mirrors/msdos;;
  60.  
  61. where mirrors/msdos is the common directory branch for the Simtel stuff.
  62.  
  63. Since you are using hhcp instead of cpf, you'll need to edit the ftget
  64. script and replace the line:
  65.  
  66.     cpf $swch -U=$user@$host -p=$pw $dir/$file@uk.ac.ft-relay $file
  67.  
  68. with something like:
  69.  
  70.     hhcp $swch -T user@host -P $pw uk.ac.ft-relay:$dir/$file $file
  71.  
  72. due to the different syntax of cpf and hhcp. If you change the name of ftget
  73. script, make sure that you change the name in the ftget.proto.
  74.  
  75. I prefer to use the -T usename -P passwd compared to hhstore stuff, since
  76. the username will change with the host you want to connect to (not to
  77. mention the recent security scare about the hhstore).
  78.  
  79. You'll probably want to change the password for the anonymous FTP into your
  80. email address.
  81.  
  82. That is just about all that I could think of. If you have an questions,
  83. please let me know, and I'll do my best to try to answer them.
  84. I hope that I haven't forgotten anything important.
  85. Best regards,
  86.  
  87. --Nino
  88.  
  89. P.S. Here are the scripts:
  90.  
  91. --------------------------- FTGET ---------------------------------------
  92. [ Now in file 'ftget' ]
  93. ------------------------- FTGET.PROTO -----------------------------------
  94. [ Now in file 'ftget.proto' ]
  95. -------------------------------------------------------------------------
  96. Janet: nino@uk.ac.ucl.sm.mph                    \    Nino Margetic
  97. Earn/Bitnet: nino@mph.sm.ucl.ac.uk               \   Dept. of Medical Physics
  98. Internet: nino%mph.sm.ucl.ac.uk@nsfnet-relay.ac.uk\  University College London
  99. Bang-path: ....!mcvax!ukc!ucl-mph!nino             \ Tel:+44-71-380-9300/x5313
  100. -----
  101. Excellent day to have a rotten day.
  102.